--- @param extension Package
--- @param HY HY_Utility
--- @param U Utility
return function(extension, HY, U)
    local hy_miyako_yoshika = General:new(extension, "hy_miyako_yoshika", "jin_k", 3, 3, General.Female)

    local zombie_body = fk.CreateSkill {
        name = "zombie_body",
    }
    zombie_body:addEffect("atkrange", {
        fixed_func = function(self, player)
            if player:hasSkill(zombie_body.name) then
                return 2
            end
        end
    })
    zombie_body:addEffect(fk.TargetSpecified, {
        is_delay_effect = true,
        can_trigger = function(self, event, target, player, data)
            return player:hasSkill(zombie_body.name) and data.card.trueName == "slash" and data.from == player
        end,
        on_use = function(self, event, target, player, data)
            data.to:addQinggangTag(data)
            data:setResponseTimes(data:getResponseTimes(data.to) + 1, data.to)
        end
    })

    local rot_hell = fk.CreateSkill {
        name = "rot_hell",
    }
    rot_hell:addEffect(fk.Damaged, {
        can_trigger = function(self, event, target, player, data)
            return player:hasSkill(rot_hell.name) and data.to == player and data.from and player:usedSkillTimes(rot_hell.name, Player.HistoryTurn) < 1 and player.room.current.phase ~= Player.NotActive
        end,
        on_cost = Util.TrueFunc,
        on_use = function(self, event, target, player, data)
            local room = player.room
            local count = math.max(1, #data.from:getCardIds("e"))
            local choice1 = "rot_hell_choice1:" .. player.id
            local choice2 = "rot_hell_choice2:::" .. count
            local result = room:askToChoice(data.from, {
                skill_name = rot_hell.name,
                choices = { choice1, choice2 },
                prompt = "rot_hell_prompt"
            })
            if result == choice1 then
                room:recover({
                    who = player,
                    num = 1,
                    skillName = rot_hell.name,
                    recoverBy = data.from
                })
            elseif result == choice2 then
                room:addPlayerMark(data.from, "@rotten", count)
            end
        end,
    })
    rot_hell:addEffect(fk.TurnEnd, {
        is_delay_effect = true,
        can_trigger = function(self, event, target, player, data)
            local targets = {}
            for _, t in ipairs(player.room:getOtherPlayers(player)) do
                if t:getMark("@rotten") > 0 then
                    table.insertIfNeed(targets, t)
                end
            end
            if #targets > 0 then
                event:setCostData(self, targets)
            end
            return player:hasSkill(rot_hell.name) and #targets > 0
        end,
        on_use = function(self, event, target, player, data)
            local room = player.room
            local targets = event:getCostData(self)
            for _, t in ipairs(targets) do
                room:removePlayerMark(t, "@rotten", 1)
                room:damage({
                    to = t,
                    damage = 1,
                    damageType = fk.NormalDamage,
                    skillName = rot_hell.name
                })
            end
        end
    })

    local poison_claw = fk.CreateSkill {
        name = "poison_claw",
    }
    poison_claw:addEffect(fk.TurnStart, {
        can_trigger = function(self, event, target, player, data)
            return player:hasSkill(poison_claw.name) and target == player
        end,
        on_cost = Util.TrueFunc,
        on_use = function(self, event, target, player, data)
            player.room:addPlayerMark(player, "@rotten", 1)
        end,
    })
    poison_claw:addEffect(fk.Damage, {
        can_trigger = function(self, event, target, player, data)
            return player:hasSkill(poison_claw.name) and player:getMark("@rotten") > 0 and data.from and data.from == player and not data.to.dead
        end,
        on_cost = function(self, event, target, player, data)
            return player.room:askToSkillInvoke(player, {
                skill_name = poison_claw.name,
                prompt = "poison_claw_prompt::" .. data.to.id .. ":" .. player:getMark("@rotten")
            })
        end,
        on_use = function(self, event, target, player, data)
            local room = player.room
            local count = player:getMark("@rotten")
            room:removePlayerMark(player, "@rotten", count)
            room:addPlayerMark(data.to, "@rotten", count)
        end
    })

    extension:loadSkillSkels { zombie_body, rot_hell, poison_claw }
    hy_miyako_yoshika:addSkills { "zombie_body", "rot_hell", "poison_claw" }

    Fk:loadTranslationTable {
        ["hy_miyako_yoshika"] = "宫古芳香",
        ["#hy_miyako_yoshika"] = "轻蔑的永生",
        ["illustrator:hy_miyako_yoshika"] = "萌風まあ",
        ["designer:hy_miyako_yoshika"] = "黑曜人形",
        ["cv:hy_miyako_yoshika"] = "",

        ["zombie_body"] = "僵体",
        [":zombie_body"] = "你的攻击范围为2，使用【杀】无视防具且需要额外一张【闪】才能抵消。",

        ["rot_hell"] = "生腐",
        [":rot_hell"] = "每回合限一次，在你受到伤害后，伤害来源须选择一项：1.令你回复1点体力；2.获得X枚“腐”标记（X为其装备区牌数且至少为1）。每回合结束时，其他有“腐”的角色移去1枚“腐”并受到1点伤害。",
        ["rot_hell_prompt"] = "生腐：你须选择一项",
        ["rot_hell_choice1"] = "令%src回复1点体力",
        ["rot_hell_choice2"] = "获得%arg枚“腐”标记",
        ["@rotten"] = "腐",

        ["poison_claw"] = "毒爪",
        [":poison_claw"] = "回合开始时，你获得1枚“腐”。在你造成伤害后，你可以移去全部“腐”并令受伤角色获得等量枚“腐”。",
        ["poison_claw_prompt"] = "毒爪：你可以令%dest获得%arg枚“腐”标记",
    }
end
